/*
 * ForSaleBO.java
 *
 * Created on March 5, 2007, 8:07 PM
 *
 * Stores information about a coupon, which is applied to a revenue source
 * contained on a transaction line.  This object contains the relevant
 * revenue source ID, the amount or percentage of the coupon, the start and
 * expiration dates, and a description of the coupon.
 */

package edu.byu.isys413.group1E.data;

import java.util.Calendar;
import java.util.Date;

/**
 * @author Jon Tehero
 */
public class ForRentBO extends PhysicalBO {
    
    private int timesRented;
    private boolean currentRentalItem;
    private boolean inStock;
    
    
    /** Creates a new instance of ForSaleBO */
    ForRentBO() {
          
    }
    /** Creates a new instance of TransactionBO with an ID*/
    ForRentBO(String productID) {
        setProductID(productID);
        setDirty(true);
    }
    /**
     * Returns the number of times an item has been rented
     */
    public int getTimesRented() {
        return timesRented;
    }
    
    public void setTimesRented(int timesRented) {
        this.timesRented = (timesRented + 1);
        setDirty(true);
    }
    
    boolean isCurrentRentalItem() {
        return currentRentalItem;
    }
    
    public void setCurrentRentalItem(boolean currentRentalItem) {
        this.currentRentalItem = currentRentalItem;
        setDirty(true);    
    }

    public boolean isInStock() {
        return inStock;
    }

    public void setInStock(boolean inStock) {
        this.inStock = inStock;
        setDirty(true);        
    }
}
